import App from "./App";

// #ifndef VUE3
import Vue from "vue";
import uView from "uview-ui";
import { router, RouterMount } from "./router";
import store from "./store";
import tools from "./utils";
import io from "@hyoga/uni-socket.io";

const socket = io("http://192.168.31.63:3067", {
  transports: ["websocket", "polling"],
  timeout: 5000,
});


Vue.use(uView);
Vue.use(router);
Vue.config.productionTip = false;
Vue.prototype.$tools = tools;
Vue.prototype.$socket = socket;

App.mpType = "app";
const app = new Vue({
  ...App,
  store,
});
RouterMount(app, router, "#app");
app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from "vue";
export function createApp() {
  const app = createSSRApp(App);
  return {
    app,
  };
}
// #endif
